Hiding an open module

Hi all, does anyone know a way to make a visible open module invisible (i.e. hide, but not close it)?

Background: If you copy a view, you have to make the source module visible so you can iterate over the columns. Making it visible can be done, by just calling read/edit/share with the visible = true parameter. However I did not manage to hide it again. Anyone solved that problem? The hide perm only seems to work with built in windows like the print dialog.

Regards, Mathias
Mathias Mamsch - Thu Nov 26 16:46:35 EST 2009

Re: Hiding an open module
doors36677 - Fri Nov 27 08:39:33 EST 2009

No documented dxl function for this. Old forum discussed and workarounds offered. But, probably best approach, is to bring to the front the module you want and live with other modules in the background.

Re: Hiding an open module
llandale - Mon Nov 30 15:43:56 EST 2009

I've never found a way. Might as well just close it and re-open it. In fact, not long ago I wrote for myself fOpenStateGet() and its sibling fOpenStateSet() functions that return a module read/share/edit visible/invisible state to what it was. Yup, the close and re-open when necissary.

  • Louie

Re: Hiding an open module
Mathias Mamsch - Tue Dec 01 00:44:11 EST 2009

llandale - Mon Nov 30 15:43:56 EST 2009
I've never found a way. Might as well just close it and re-open it. In fact, not long ago I wrote for myself fOpenStateGet() and its sibling fOpenStateSet() functions that return a module read/share/edit visible/invisible state to what it was. Yup, the close and re-open when necissary.

  • Louie

The problem with closing and reopening it is, that all module handles will get invalid. If I have a copyView library function which will show and hide the module again by closing and reopening, then the main program will have to take care to reinitialize the handles to the 'Module' variable, which is at least inconvienient. Then if you want to copy several views from the same module you don't want to reopen/close the module everytime, so you will need to do put the closing and reopening in the main program anyway.

I guess I will have to settle with just raising an error, when copyView is called on an invisible module and let the main program take care about making the module visible.

Thanks and best regards, Mathias

Re: Hiding an open module
SystemAdmin - Mon Jun 20 14:55:18 EDT 2011

Mathias Mamsch - Tue Dec 01 00:44:11 EST 2009
The problem with closing and reopening it is, that all module handles will get invalid. If I have a copyView library function which will show and hide the module again by closing and reopening, then the main program will have to take care to reinitialize the handles to the 'Module' variable, which is at least inconvienient. Then if you want to copy several views from the same module you don't want to reopen/close the module everytime, so you will need to do put the closing and reopening in the main program anyway.

I guess I will have to settle with just raising an error, when copyView is called on an invisible module and let the main program take care about making the module visible.

Thanks and best regards, Mathias

Did anybody ever figure this out? I am populating a choice DBE based on the objects in the non default view of a module and do not want to have to show the module everytime the script is run and the load view command seems to only work when the module is visible.

Re: Hiding an open module
llandale - Mon Jun 20 16:28:39 EDT 2011

SystemAdmin - Mon Jun 20 14:55:18 EDT 2011
Did anybody ever figure this out? I am populating a choice DBE based on the objects in the non default view of a module and do not want to have to show the module everytime the script is run and the load view command seems to only work when the module is visible.

I'm pretty sure I figure out how to load any view in an invisible module. Not done debugging this but I think works. Here's my function and the code to test it. Folks will want to go to the folder with their text module then edit line 28 for the name of the module. Folks may want to read the comments at the top.

Maybe it works and someone can excercise it to find any lingering bugs.

  • Louie

Re: Hiding an open module
llandale - Mon Jun 20 16:33:00 EDT 2011

llandale - Mon Jun 20 16:28:39 EDT 2011
I'm pretty sure I figure out how to load any view in an invisible module. Not done debugging this but I think works. Here's my function and the code to test it. Folks will want to go to the folder with their text module then edit line 28 for the name of the module. Folks may want to read the comments at the top.

Maybe it works and someone can excercise it to find any lingering bugs.

  • Louie

Oops
Attachments

attachment_14629960_Test_LoadAllViewsInvisibly.dxl